﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel.Dispatcher;

namespace MillerApp.CommonLib.WCF
{
    /// <summary>
    /// 通用的WCF拦截操作
    /// http://www.cnblogs.com/vwxyzh/archive/2010/10/27/1862569.html
    /// WCF服务端基于配置的实现——拦截
    /// </summary>
    public class GeneralOperationInvoker : IOperationInvoker
    {
        public object[] AllocateInputs()
        {
            throw new NotImplementedException();
        }

        public object Invoke(object instance, object[] inputs, out object[] outputs)
        {
            // do something before invoking
            object result = Invoke(instance, inputs, out outputs);
            // do something after invoking
            return result;
        }

        public IAsyncResult InvokeBegin(object instance, object[] inputs, AsyncCallback callback, object state)
        {
            throw new NotImplementedException();
        }

        public object InvokeEnd(object instance, out object[] outputs, IAsyncResult result)
        {
            throw new NotImplementedException();
        }

        public bool IsSynchronous
        {
            get { throw new NotImplementedException(); }
        }
    }
}
